package com.easy.service.impl;

import com.easy.bean.Patient;
import com.easy.dao.IPatientDao;
import com.easy.service.IPatientService;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PatientService implements IPatientService {

    @Autowired
    IPatientDao dao;


    @Override
    public List<Patient> getPatient(Patient patient, Page page) {
        return dao.getPatient(patient,page);
    }

    @Override
    public int addPatient(Patient patient) {
        return dao.addPatient(patient);
    }

    @Override
    public int editPatient(Patient patient) {
        int count=dao.editPatient(patient);
        return count;
    }

    @Override
    public Patient getPatientById(int id) {
        return dao.getPatientById(id);
    }

    @Override
    public int delPatient(int id) {
        return 0;
    }

    @Override
    public int getCount(Patient patient) {
        return dao.getCount(patient);
    }
}
